<div class="votes">
    <h2>
        <div class="com_tit">人气投票<span>VOTES</span></div>
    </h2>
    <?php if ($top3males != null) { ?>
    <div class="votes_list">
        <div class="votes_img">
            <?php
                        $top1male = $top3males[0];
            $imgLink = $top1male->getCelebrity()->getSnapshotSmall() != null
                    ? $top1male->getCelebrity()->getSnapshotSmall() : $top1male->getCelebrity()->getSnapshotBig();
            echo link_to("<img src='" . $imgLink . "'>", "celebrity/detail?celebrityId=" . $top1male->getCelebrityId())
            ?>
            <!--            <a href="#" target="_blank"><img src="images/img08.jpg"></a>-->
        </div>
        <div class="votes_top">
            <?php
                                                       $idx = 1;
                foreach ($top3males as $male) {
                    if ($idx == 1)
                        echo "<p class='top1'>";
                    else
                        echo "<p>";
                    echo "第" . Constants::$CHINESE_NUM[$idx] . "名：";
                    echo $male->getCelebrity()->getName() . "</p>";
                    $idx++;
                }
                ?>
        </div>
        <div class="votes_tp">
            <?php echo link_to("男星投票通道", "celebrityVote/list?component=candidateList&theme=male", array("target" => "_blank")) ?>
            <!--            <a href="#" target="_blank">男星投票通道</a>-->
        </div>
    </div>
            <?php

}
    if ($top3females != null) {
        ?>
        <div class="votes_list">
            <div class="votes_img">
                <?php
                                        $top1female = $top3females[0];
                echo link_to("<img src='" . utility::getCelebrityImgSmallElseBig($top1female->getCelebrity()) . "'>", "celebrity/detail?celebrityId=" . $top1female->getCelebrityId())
                ?>
                <!--            <a href="#" target="_blank"><img src="images/img08.jpg"></a>-->
            </div>
            <div class="votes_top">
                <?php
                                                                       $idx = 1;
                    foreach ($top3females as $female) {
                        if ($idx == 1)
                            echo "<p class='top1'>";
                        else
                            echo "<p>";
                        echo "第" . Constants::$CHINESE_NUM[$idx] . "名：";
                        $name = $female->getCelebrity()->getName();
//                        mb_regex_encoding('UTF-8');
//                        $name = mb_substr($name,0,4,'UTF-8');
                        echo $name . "</p>";
                        $idx++;
                    }
                    ?>
            </div>
            <div class="votes_tp">
                <?php echo link_to("女星投票通道", "celebrityVote/list?component=candidateList&theme=female", array("target" => "_blank")) ?>
                <!--            <a href="#" target="_blank">女星投票通道</a>-->
            </div>
        </div>
                <?php

    }
    if ($top3bands != null) {
        ?>
        <div class="votes_list">
            <div class="votes_img">
                <?php
                                                    $top1band = $top3bands[0];
                echo link_to("<img src='" . utility::getCelebrityImgSmallElseBig($top1band->getCelebrity()) . "'>", "celebrity/detail?celebrityId=" . $top1band->getCelebrityId())
                ?>
            </div>

            <div class="votes_top">
                <?php
                            $idx = 1;
                    foreach ($top3bands as $band) {
                        if ($idx == 1)
                            echo "<p class='top1'>";
                        else
                            echo "<p>";
                        echo "第" . Constants::$CHINESE_NUM[$idx] . "名：";
                        echo $band->getCelebrity()->getName() . "</p>";
                        $idx++;
                    }
                    ?>
            </div>

            <div class="votes_tp">
                <?php echo link_to("组合投票通道", "celebrityVote/list?component=candidateList&theme=band", array("target" => "_blank")) ?>
                <!--            <a href="#" target="_blank">组合投票通道</a>-->
            </div>
        </div>
        <?php }?>
    <div class="latest_news_more"><a href="#" target="_blank">MORE</a></div>
</div>
